@extends('public.dashboard_base')
@section('title', '资金明细')
@section('content')
    <div class="control_panel_content">
        <div class="navBreadcrumb">
            <ul>
                <li>资金管理</li>
                <li><a href="/funds/list">资金明细</a></li>
            </ul>
        </div>
        <div class="panel">
            <div class="sub_nav_container">
                <ul class="clearfix">
                    <li><a href="/funds/recharge">在线充值</a></li>
                    <li class="active"><a href="javascript:;">资金明细</a></li>
                </ul>
            </div>
            <div class="search_cond_wrap">
                <div>
                    <form action="/funds/list" id="queryForm">
                        <span>时间：</span>
                        <input type="text" readonly="" name="timeRange" class="select_date" id="date-select"
                               style="width: 200px;" lay-key="1">&ensp;
                        <span>类型：</span>
                        <select name="lx1" id="businessType">
                            <option value="">请选择</option>
                            <option selected="selected" value="1">充值</option>
                            <option value="11">消费</option>
{{--                            <option value="3">交易</option>--}}
{{--                            <option value="4">域名接收</option>--}}
                            <option value="12">充值退款</option>
                            <option value="13">提现</option>
                        </select>&ensp;
                        <input type="hidden" name="queryField" value="domain">
                        <a href="javascript:;" class="btn btn_primary" id="queryBtn">搜索</a>&nbsp;
                        <a href="javascript:;" class="btn btn_default" id="resetBtn">重置</a>&nbsp;
                        <a href="javascript:;" class="btn btn_default" id="exportBtn">导出</a>
                    </form>
                </div>
            </div>
            <section class="mainResult">
{{--                搜索结果<span class="text_orange">（<span id="total-rows">0</span>）</span>--}}
            </section>
            <table class="table_style">
                <thead>
                <tr>
                    <th width="15%">操作人</th>
                    <th width="15%">类型</th>
                    <th width="10%">金额</th>
                    <th width="20%">交易时间</th>
                    <th width="40%">备注</th>
                </tr>
                </thead>
                <tbody class="finance_detail_list">
                @forelse($data as $item)
                    <tr>
                        <td>{{$item->operator}}</td>
                        <td>
                            @if($item->type ==-1) 后台扣除
                            @elseif($item->type ==0) 后台充值
                            @elseif($item->type ==1) 支付宝充值
                            @elseif($item->type ==2) 微信充值
                            @elseif($item->type ==11) 消费
                            @elseif($item->type ==12) 充值退款
                            @elseif($item->type ==13) 提现
                            @elseif($item->type ==14) 提现驳回
                            @elseif($item->type ==21) 奖励
                            @elseif($item->type ==41) 转入
                            @elseif($item->type ==42) 转出
                            @endif

                        </td>
                        <td>{{$item->value}}</td>
                        <td>{{$item->created_at}}</td>
                        <td>{{$item->remarks}}</td>
                    </tr>
                @empty
                    <tr>
                        <td colspan="6" style="color: #999; text-align: center;">没有数据</td>
                    </tr>
                @endforelse
                </tbody>
            </table>
        </div>
        <div style="margin: 20px 20px;display: flex; justify-content: center">
            <div>
                {{ $data->appends(['queryValue' => $queryValue,'queryType'=>$queryType])->links() }}
            </div>
        </div>
    </div>
@endsection
@section('script')
    <script type="text/javascript" src="/static/js/laydate.js"></script>
    <script>
        $(function () {
            var link = $("#funds-list");
            link.parent().parent().parent().addClass("active");
            link.parent().addClass("active");

        });
    </script>
@endsection
